package indi.zhifa.recipe.bailan.framework.auth.entity.enums;

import com.baomidou.mybatisplus.annotation.EnumValue;
import indi.zhifa.recipe.bailan.framework.enums.entity.annotations.EnumDesc;
import lombok.Getter;
import lombok.RequiredArgsConstructor;

@RequiredArgsConstructor
@EnumDesc(desc = "数据权限类型")
public enum EDataPermissionType {

    ID_EQ(1,"自有权限","在SQL中拼XX=#userId"),
    AUTH_ID(2,"鉴权节点ID权限","在SQL中拼authId = #userAuthId"),
    AUTH_CASCADE(3,"级联权限","在SQL中拼depCascade like #userAuthCascade%"),
    AUTH_CASCADE_CHILDREN(4,"级联子项","在SQL中拼authCascade like #userAuthCascade-%")
    ;

    @EnumValue
    @Getter
    final int code;
    @Getter
    final String name;
    @Getter
    final String description;
}
